package com.winit.mycat;

import com.winit.util.ConfigUtil;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * Created by wangjian on 17/6/19.
 */
public class MycatConnUtil {

    public static Connection getMycatConn() throws Exception {
        Class.forName(ConfigUtil.getValue("jdbc.driverClassName"));
        Connection conn = DriverManager.getConnection(ConfigUtil.getValue("jdbc.url")
                , ConfigUtil.getValue("jdbc.username"), ConfigUtil.getValue("jdbc.password"));
        return conn;
    }

}
